#include <stdio.h>
#include "list.h"
#include "thrdpool.h"
void func(void* arg, int event)
{
    printf("hello world\n");
}

int main()
{
    Thrd* pool = thrdpool_init(4);
    if(NULL == pool) {
        printf("thrdpool failed\n");
        return 1;
    }
    printf("thrdpool success\n");
    Task task;
    task.handle = func;
    task.ctx    = NULL;
    for(int i = 0; i < 100; ++i) { thrdpool_add(pool, &task); }
    getchar();
    return 0;
}